export default [
  // 权限路由
  {
    path: '/',
    redirect: '/technician',
    hidden: true // 是否展示在侧边栏的菜单里
  },
  //  助教管理
  {
    path: '/technician',
    component: 'Layout',
    redirect: '/technician/list',
    meta: {
      menuName: 'Technician',
      icon: 'iconshenqingjishi3',
      subNavName: [{
        name: 'TechnicianManage',
        url: [{
          name: 'TechnicianManage',
          url: '/technician/list'
        }]
      }]
    },
    children: [{
      path: 'list',
      name: 'TechnicianManage',
      component: '/technician/list',
      meta: {
        keepAlive: true,
        title: 'TechnicianManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'TechnicianManage',
          index: 0,
          auth: ['pagedata', 'add', 'edit']
        }]
      }
    }, {
      path: 'edit',
      name: 'TechnicianEdit',
      component: '/technician/edit',
      hidden: true,
      meta: {
        keepAlive: false,
        title: 'TechnicianManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'TechnicianEdit',
          index: 0,
          auth: []
        }]
      }
    }]
  },
  // 代理商
  // {
  //   path: '/agent',
  //   component: 'Layout',
  //   redirect: '/agent/distribute',
  //   meta: {
  //     menuName: 'Agent',
  //     icon: 'icon-zizhanghaoguanli',
  //     subNavName: [{
  //       name: 'AgentManage',
  //       url: [
  //         {
  //           name: 'AgentDistribute',
  //           url: '/agent/distribute'
  //         }
  //       ]
  //     }]
  //   },
  //   children: [
  //     {
  //       path: 'distribute',
  //       name: 'AgentDistribute',
  //       component: '/agent/distribute',
  //       meta: {
  //         title: 'AgentManage',
  //         auth: [],
  //         isOnly: false,
  //         pagePermission: [{
  //           title: 'AgentDistribute',
  //           index: 0,
  //           auth: ['pagedata', 'add', 'edit', 'delete']
  //         }]
  //       }
  //     },
  //   ]
  // },
  //  订单管理
  {
    path: '/shop',
    component: 'Layout',
    redirect: '/shop/order/list',
    meta: {
      menuName: 'Shop',
      icon: 'icon-dingdanguanli',
      subNavName: [{
        name: 'ShopOrderManage',
        url: [{
          name: 'ShopOrder',
          url: '/shop/order/list'
        }, {
          name: 'ShopBellOrder',
          url: '/shop/order/bell'
        }, {
          name: 'ShopRefuseOrder',
          url: '/shop/order/refuse'
        }, {
          name: 'ShopRefund',
          url: '/shop/refund/list'
        }, {
          name: 'ShopBellRefund',
          url: '/shop/refund/bell'
        }]
      }, {
        name: 'ShopEvaluate',
        url: [{
          name: 'ShopEvaluate',
          url: '/shop/evaluate/list'
        }]
      }]
    },
    children: [{
      path: 'order/list',
      name: 'ShopOrder',
      component: '/shop/order/list',
      meta: {
        keepAlive: true,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopOrder',
          index: 0,
          auth: ['pagedata', 'view', 'print', 'export', 'transferOrder', 'orderTaking', 'setOut', 'arrive', 'startService', 'serviceCompletion']
        }]
      }
    }, {
      path: 'order/bell',
      name: 'ShopBellOrder',
      component: '/shop/order/bell',
      meta: {
        keepAlive: true,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopBellOrder',
          index: 0,
          auth: ['pagedata', 'view', 'print', 'export', 'orderTaking', 'startService', 'serviceCompletion']
        }]
      }
    }, {
      path: 'order/refuse',
      name: 'ShopRefuseOrder',
      component: '/shop/order/refuse',
      meta: {
        keepAlive: true,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopRefuseOrder',
          index: 0,
          auth: ['pagedata', 'view', 'transferOrder', 'agreeRefund']
        }]
      }
    }, {
      path: 'order/detail',
      name: 'ShopOrderDetail',
      component: '/shop/order/detail',
      hidden: true,
      meta: {
        keepAlive: false,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopOrderDetail',
          index: 0,
          auth: []
        }]
      }
    }, {
      path: 'refund/list',
      name: 'ShopRefund',
      component: '/shop/refund/list',
      meta: {
        keepAlive: true,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopRefund',
          index: 0,
          auth: ['pagedata', 'view', 'agreeRefund', 'rejectRefund']
        }]
      }
    }, {
      path: 'refund/bell',
      name: 'ShopBellRefund',
      component: '/shop/refund/bell',
      meta: {
        keepAlive: true,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopBellRefund',
          index: 0,
          auth: ['pagedata', 'view', 'agreeRefund', 'rejectRefund']
        }]
      }
    }, {
      path: 'refund/detail',
      name: 'ShopRefundDetail',
      component: '/shop/refund/detail',
      hidden: true,
      meta: {
        keepAlive: false,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopRefundDetail',
          index: 0,
          auth: []
        }]
      }
    }, {
      path: 'evaluate/list',
      name: 'ShopEvaluate',
      component: '/shop/evaluate/list',
      meta: {
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopEvaluate',
          index: 0,
          auth: ['pagedata', 'add', 'delete']
        }]
      }
    }]
  },
  // 业务员管理
  // {
  //   path: '/salesman',
  //   component: 'Layout',
  //   redirect: '/salesman/examine',
  //   meta: {
  //     menuName: 'Salesman',
  //     icon: 'icon-account-line',
  //     subNavName: [{
  //       name: 'SalesmanManage',
  //       url: [{
  //         name: 'SalesmanExamine',
  //         url: '/salesman/examine'
  //       }, {
  //         name: 'SalesmanCount',
  //         url: '/salesman/count'
  //       }]
  //     }]
  //   },
  //   children: [{
  //     path: 'examine',
  //     name: 'SalesmanExamine',
  //     component: '/salesman/examine',
  //     meta: {
  //       title: 'SalesmanManage',
  //       auth: [],
  //       isOnly: false,
  //       pagePermission: [{
  //         title: 'SalesmanExamine',
  //         index: 0,
  //         auth: ['pagedata', 'view', 'delete', 'authSalesman', 'cancelAuth', 'resetAuth']
  //       }]
  //     }
  //   }, {
  //     path: 'count',
  //     name: 'SalesmanCount',
  //     component: '/salesman/count',
  //     meta: {
  //       keepAlive: true,
  //       title: 'SalesmanManage',
  //       auth: [],
  //       isOnly: false,
  //       pagePermission: [{
  //         title: 'SalesmanCount',
  //         index: 0,
  //         auth: []
  //       }]
  //     }
  //   }]
  // },
  // 渠道商管理
  // {
  //   path: '/channel',
  //   component: 'Layout',
  //   redirect: '/channel/examine',
  //   meta: {
  //     menuName: 'Channel',
  //     icon: 'iconwoshiqudaoshang',
  //     subNavName: [{
  //       name: 'ChannelManage',
  //       url: [{
  //         name: 'ChannelExamine',
  //         url: '/channel/examine'
  //       }, {
  //         name: 'ChannelFinance',
  //         url: '/channel/finance'
  //       }]
  //     }]
  //   },
  //   children: [{
  //     path: 'examine',
  //     name: 'ChannelExamine',
  //     component: '/channel/examine',
  //     meta: {
  //       title: 'ChannelManage',
  //       auth: [],
  //       isOnly: false,
  //       pagePermission: [{
  //         title: 'ChannelExamine',
  //         index: 0,
  //         auth: ['pagedata', 'view', 'delete', 'authChannel', 'cancelAuth', 'resetAuth']
  //       }]
  //     }
  //   }, {
  //     path: 'finance',
  //     name: 'ChannelFinance',
  //     component: '/channel/finance',
  //     meta: {
  //       title: 'ChannelManage',
  //       auth: [],
  //       isOnly: false,
  //       pagePermission: [{
  //         title: 'ChannelFinance',
  //         index: 0,
  //         auth: ['pagedata', 'print', 'export']
  //       }]
  //     }
  //   }]
  // },
  //  财务管理
  {
    path: '/finance',
    component: 'Layout',
    redirect: '/finance/commission',
    meta: {
      menuName: 'Finance',
      icon: 'icon-caiwu',
      subNavName: [{
        name: 'FinanceManage',
        url: [{
          name: 'FinanceCommission',
          url: '/finance/commission'
        }, {
          name: 'FinanceRecord',
          url: '/finance/record'
        }, {
          name: 'FinanceSheet',
          url: '/finance/sheet'
        }]
      }]
    },
    children: [{
      path: 'commission',
      name: 'FinanceCommission',
      component: '/finance/finance/commission',
      meta: {
        title: 'FinanceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'FinanceCommission',
          index: 0,
          auth: ['pagedata', 'cashOut']
        }]
      }
    }, {
      path: 'record',
      name: 'FinanceRecord',
      component: '/finance/finance/record',
      meta: {
        keepAlive: false,
        title: 'FinanceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'FinanceRecord',
          index: 0,
          auth: []
        }]
      }
    }, {
      path: 'sheet',
      name: 'FinanceSheet',
      component: '/finance/finance/sheet',
      meta: {
        title: 'FinanceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'FinanceSheet',
          index: 0,
          auth: ['pagedata', 'export']
        }]
      }
    }]
  },
  // 门店
  {
    path: '/store',
    component: 'Layout',
    redirect: '/store/list',
    meta: {
      menuName: 'Store',
      icon: 'iconshangjia',
      subNavName: [{
        name: 'StoreManage',
        url: [{
          name: 'StoreList',
          url: '/store/list'
        }, {
          name: 'StoreService',
          url: '/store/service'
        }]
      }]
    },
    children: [{
      path: 'list',
      name: 'StoreList',
      component: '/store/list/list',
      meta: {
        keepAlive: true,
        title: 'StoreManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'StoreList',
          index: 0,
          auth: ['pagedata', 'edit']
        }]
      }
    }, {
      path: 'list/edit',
      name: 'StoreEdit',
      component: '/store/list/edit',
      meta: {
        title: 'StoreManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'StoreEdit',
          index: 0,
          auth: []
        }]
      }
    }, {
      path: 'service',
      name: 'StoreService',
      component: '/store/service/list',
      meta: {
        keepAlive: true,
        title: 'StoreManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'StoreService',
          index: 0,
          auth: ['pagedata', 'add', 'edit', 'delete']
        }]
      }
    }, {
      path: 'service/edit',
      name: 'StoreServiceEdit',
      component: '/store/service/edit',
      meta: {
        title: 'StoreManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'StoreServiceEdit',
          index: 0,
          auth: []
        }]
      }
    }]
  },
  //  订单通知
  {
    path: '/order',
    component: 'Layout',
    redirect: '/order/notice',
    isHidden: true,
    meta: {
      menuName: 'ShopOrderNotice',
      icon: 'icon-tongzhi'
    },
    children: [{
      path: 'notice',
      name: 'ShopOrderNoticeList',
      component: '/shop/notice',
      meta: {
        keepAlive: true,
        title: '',
        auth: [],
        isOnly: true,
        pagePermission: [{
          title: 'ShopOrderNoticeList',
          index: 0,
          auth: ['pagedata', 'read', 'delete']
        }]
      }
    }]
  },
  // 权限管理
  {
    path: '/account',
    component: 'Layout',
    redirect: '/account/phone',
    meta: {
      menuName: 'Account',
      icon: 'icon-account',
      subNavName: [{
        name: 'AccountPhoneManage',
        url: [{
          name: 'AccountPhone',
          url: '/account/phone'
        }]
      }]
    },
    children: [{
      path: 'phone',
      name: 'AccountPhone',
      component: '/account/phone',
      meta: {
        title: 'AccountManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'AccountPhone',
          index: 0,
          auth: ['pagedata', 'add', 'edit', 'delete']
        }]
      }
    }]
  },
  // {
  //   path: '/agent1',
  //   component: 'Layout',
  //   redirect: '/agent1/fdd',
  //   meta: {
  //     menuName: 'AgentFdd',
  //     icon: 'iconhetongguanli'
  //   },
  //   children: [{
  //     path: 'fdd',
  //     name: 'AgentFdd',
  //     component: '/agent1/fdd',
  //     meta: {
  //       refresh: false,
  //       title: '',
  //       isOnly: true,
  //       auth: [],
  //       pagePermission: [{
  //         title: 'AgentFdd',
  //         index: 0,
  //         auth: []
  //       }]
  //     }
  //   }]
  // },
  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]
